extends ../layout




block content
    .container
        .row
            .table.table-hover.table-bordered
                table(class='table')
                    thead
                        tr
                            th 电影名字
                            th 导演
                            th 国家
                            th 上映年份
                            th 录入时间
                            th 查看
                            th 更新
                            th 删除
                        tbody
                        each item in movies
                            tr(class="item-id-#{item_id}")
                            td #{item.title}
                            td #{item.doctor}
                            td #{item.country}
                            td #{item.year}
                            td #{moment(item.meta.updateAt).format('MM/DD/YYYY')}
                            td: a(target="_blank",href="/movie/#{item._id}") 查看
                            td: a(target="_blank",href="/admin/update/#{item._id}") 修改
                            //td
                                button.btn.btn-danger.del(type="button",data-id="#{item._id}",onclick="javascript:del(#{item._id});") 删除
                            td
                                button.btn.btn-primary(data-toggle="modal",data-target=".bs-example-modal-sm",type="button" ) 删除
                                .modal.fade.bs-example-modal-sm#del(tabindex="-1", role="dialog", aria-labelledby="mySmallModalLabel",style="display: none;")
                                    .modal-dialog.modal-sm(role="document")
                                        .modal-content

                                            .modal-header
                                                button.close(type="button",data-dismiss="modal",aria-label="Close")
                                                    span(aria-hidden="true") x
                                                h4.modal-title 提示
                                            .modal-body
                                                input(type="hidden",id="delModal" )
                                                确定删除吗?
                                            .modal-footer
                                                button.btn.btn-default(data-dismiss="modal") 取消

                                                a.btn.btn-success(type="button",data-dismiss="modal",onclick="del('#{item._id}')") 确定


    //- script()